package com.xsdl.memento;

import java.util.Stack;

public class SnapshotHolder {

    private Stack<Snapshot> snapshotStack = new Stack<>();

    public void addSnapshot(Snapshot snapshot) {
        snapshotStack.push(snapshot);
    }

    public Snapshot getSnapshot() {
        return snapshotStack.pop();
    }

}
